<!DOCTYPE html>
<html>
<head>
	
	<title>编辑对象</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="renderer" content="webkit">
<link rel="stylesheet" href="/ui2/src/css/layui.css" media="all" />
<link rel="stylesheet" href="/ui2/css/public.css" media="all" />
<link rel="stylesheet" type="text/css" href="/ui/eova/css/eova.css">

<!--  <link rel="stylesheet" href="http://www.layui.com/admin/std/dist/layuiadmin/style/admin.css" media="all"> -->

<script type="text/javascript" src="/ui/js/jquery.min.js"></script>
<script type="text/javascript" src="/ui/js/json2-min.js"></script>

<script type="text/javascript" src="/ui/js/common.js"></script>
<script type="text/javascript" src="/ui/js/string.js"></script>

<script type="text/javascript" src="/ui2/src/layui.js"></script>
<script type="text/javascript" src="/ui2/js/DataTableExtend.js"></script>

<!-- <script type="text/javascript" src="http://yelog.org/layui-select-multiple/layui/layui.js"></script> -->

<!-- <script type="text/javascript" src="../../ui2/js/dataList.js"></script> -->





<script type="text/javascript" src="/plugins/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>



<script type="text/javascript" src="/plugins/format/jsformat.js"></script>

<script type="text/javascript" src="/ui/easy/easy.min.js"></script>
<script type="text/javascript" src="/ui/eova/eova.min.js"></script>
<script type="text/javascript" src="/ui/eova/src/eova.find.js"></script>



<script>
String.prototype.replaceAll  = function(s1,s2){     
    return this.replace(new RegExp(s1,"gm"),s2);     
} 
// 全局JS常量配置
var IMG = "${IMG!}";
var FILE = "${FILE!}";
var FILE_MAX = "${UPLOAD_FILE_SIZE!}";
var IMG_MAX = "${UPLOAD_IMG_SIZE!}";

//类似 .jpg|.gif|.png|.bmp
var UPLOAD_IMG_TYPE = "${UPLOAD_IMG_TYPE!}".replaceAll('\\.', '');
var UPLOAD_FILE_TYPE = "${UPLOAD_FILE_TYPE!}".replaceAll('\\.', '');
//刷新此页面
var refresh = function() {
	location.reload();
};

//页面类型 add/update/detail/examine
var PAGE_TYPE = "${PAGE_TYPE!}";

//监听页面大小
var layerInitWidth;
var layerInitHeight;

</script>
</head>

<!--  <link rel="stylesheet" href="http://www.layui.com/admin/std/dist/layuiadmin/style/admin.css" media="all"> -->
      <link href="/plugins/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
   <script type="text/javascript" charset="utf-8" src="/plugins/umeditor/umeditor.config.js"></script>
  <script type="text/javascript" charset="utf-8" src="/plugins/umeditor/umeditor.min.js"> </script>
    <!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
    <!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
  <script type="text/javascript" charset="utf-8" src="/plugins/umeditor/lang/zh-cn/zh-cn.js"></script>
<body>

<!--  暂时只做下属角色数据分配，不做数据范围筛选  -->
<div class="layui-tab">
  <ul class="layui-tab-title">
    <li class="layui-this">网站设置</li>
    <li>用户管理</li>
    <li>权限分配</li>
    <li>商品管理</li>
    <li>订单管理</li>
  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">
      <form id="updateFormeova_object_code" name="updateFormeova_object_code" method="post"  class="layui-form layui-form-pane">
    	<div class="layui-form">
		  <table class="layui-table">
		    <colgroup>
		      <col width="150">
		      <col width="150">
		      <col width="200">
		      <col>
		    </colgroup>
		    <thead>
		      <tr>
		        <th>人物</th>
		        <th>民族</th>
		        <th>出场时间</th>
		        <th>格言</th>
		      </tr> 
		    </thead>
		    <tbody>
		      <tr>
		        <td>贤心</td>
		        <td>汉族</td>
		        <td>1989-10-14</td>
		        <td>人生似修行</td>
		      </tr>
		      <tr>
		        <td>张爱玲</td>
		        <td>汉族</td>
		        <td>1920-09-30</td>
		        <td>于千万人之中遇见你所遇见的人，于千万年之中，时间的无涯的荒野里…</td>
		      </tr>
		      <tr>
		        <td>Helen Keller</td>
		        <td>拉丁美裔</td>
		        <td>1880-06-27</td>
		        <td> Life is either a daring adventure or nothing.</td>
		      </tr>
		      <tr>
		        <td>岳飞</td>
		        <td>汉族</td>
		        <td>1103-北宋崇宁二年</td>
		        <td>教科书再滥改，也抹不去“民族英雄”的事实</td>
		      </tr>
		      <tr>
		        <td>孟子</td>
		        <td>华夏族（汉族）</td>
		        <td>公元前-372年</td>
		        <td>猿强，则国强。国强，则猿更强！ </td>
		      </tr>
		    </tbody>
		  </table>
		</div>
		<div class="layui-form-item">
		    <div class="layui-input-block">
		      <button class="layui-btn" lay-submit="" lay-filter="submit">
		    	  立即提交
		      </button>
		
		
		<script type="text/javascript">
		//表单编辑
		$(".formEdit").click(function(){
			var objectCode = 'eova_object_code';
			var formType = 'updateForm';
			
			if(objectCode.length >0){
				//新窗口打开设计窗口 /form/design/o_class?template=lay
				var url = "/form/design/"+objectCode+"?template=lay";
				if(formType != null && formType.length>0)
					url = url+"&formType="+formType;
				window.open(url);  
			}
			return false;
		});
		</script>
		</div>
		</div>
  	  </form>
    </div>
    <div class="layui-tab-item">内容2</div>
    <div class="layui-tab-item">内容3</div>
    <div class="layui-tab-item">内容4</div>
    <div class="layui-tab-item">内容5</div>
  </div>
</div>





<script>

//注意：选项卡 依赖 element 模块，否则无法进行功能性操作
layui.use('element', function(){
var element = layui.element;

//…
});


layui.use(['form','code'], function(){
	  var form = layui.form; //只有执行了这一步，部分表单元素才会自动修饰成功
	   $ = layui.$;
	   
       // 代码块
       layui.code({
           title: 'html',
           encode: true,
           about: false

       });
	
       // 手动赋值
       //$('select[name="简化多选+搜索+大小写敏感"]').val(['sing1', 'movie2']);
       form.render();
	  
	  //但是，如果你的HTML是动态生成的，自动渲染就会失效
	  //因此你需要在相应的地方，执行下述方法来手动渲染，跟这类似的还有 element.init();
       form.on('submit(submit)', function(data){
    		  //console.log(data.elem) //被执行事件的元素DOM对象，一般为button对象
    		  //console.log(data.form) //被执行提交的form对象，一般在存在form标签时才会返回
    		  //console.log(data.field) //当前容器的全部表单字段，名值对形式：{name: value}
    		  //console.log(syntaxHighlight(data.field));
    		  
    		  //提交数据
    		  submitNow(data);
    		  return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
    		});
	  
	}); 


</script>

<script type="text/javascript">
var $form = $('#updateFormeova_object_code');

var submitNow = function(data) {
	
	var myform = $.getFormParasObj($form);
	myform['PAGE_TYPE'] = PAGE_TYPE;
	
	$.post('/form/doUpdate/eova_object_code', myform, function(result) {
		if (result.success) {
			
			var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
			parent.layer.close(index);
			
			parent.reload();
		} else {
			//$.alert($pjq, result.msg);
			layer.alert(result.msg, {icon: 2});
		}
	}, 'json');
};



</script>
</body>



</html>